package com.zjm.zdk;

import java.util.concurrent.Executor;

class DirectExecutor implements Executor {
    @Override
    public void execute(Runnable r) {
        r.run();
    }

    public static void main(String[] args) {
        DirectExecutor executor = new DirectExecutor();
        System.out.println("thread-id: " + Thread.currentThread());
        executor.execute(new Runnable() {
            @Override
            public void run() {
                System.out.println("thread-id: " + Thread.currentThread());
            }
        });
    }
}